<?php if (!defined('THINK_PATH')) exit(); /*a:1:{s:69:"/var/www/dangan_new/public/../application/index/view/Login/index.html";i:1548208416;}*/ ?>
<!DOCTYPE html>
<!-- 
Template Name: Metronic - Responsive Admin Dashboard Template build with Twitter Bootstrap 3.1.1
Version: 2.0.2
Author: KeenThemes
Website: http://www.keenthemes.com/
Contact: support@keenthemes.com
Purchase: http://themeforest.net/item/metronic-responsive-admin-dashboard-template/4021469?ref=keenthemes
License: You must have a valid license purchased only from themeforest(the above link) in order to legally use the theme for your project.
-->
<!--[if IE 8]> <html lang="en" class="ie8 no-js"> <![endif]-->
<!--[if IE 9]> <html lang="en" class="ie9 no-js"> <![endif]-->
<!--[if !IE]><!-->
<html lang="en" class="no-js">
<!--<![endif]-->
<!-- BEGIN HEAD --> 
<head>
<meta charset="utf-8"/>
<title>东海航海保障中心电子档案系统</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta content="width=device-width, initial-scale=1.0" name="viewport"/>
<meta content="" name="description"/>
<meta content="" name="author"/>
<!-- BEGIN GLOBAL MANDATORY STYLES -->
<link href="http://fonts.googleapis.com/css?family=Open+Sans:400,300,600,700&subset=all" rel="stylesheet" type="text/css"/>
<link href="/static/assets/plugins/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css"/>
<link href="/static/assets/plugins/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css"/>
<link href="/static/assets/plugins/uniform/css/uniform.default.css" rel="stylesheet" type="text/css"/>
<!-- END GLOBAL MANDATORY STYLES -->
<!-- BEGIN PAGE LEVEL STYLES -->
<link rel="stylesheet" type="text/css" href="/static/assets/plugins/select2/select2.css"/>
<link rel="stylesheet" type="text/css" href="/static/assets/plugins/select2/select2-metronic.css"/>
<!-- END PAGE LEVEL SCRIPTS -->
<!-- BEGIN THEME STYLES -->
<link href="/static/assets/css/style-metronic.css" rel="stylesheet" type="text/css"/>
<link href="/static/assets/css/style.css" rel="stylesheet" type="text/css"/>
<link href="/static/assets/css/style-responsive.css" rel="stylesheet" type="text/css"/>
<link href="/static/assets/css/plugins.css" rel="stylesheet" type="text/css"/>
<link href="/static/assets/css/themes/default.css" rel="stylesheet" type="text/css" id="style_color"/>
<link href="/static/assets/css/pages/login.css" rel="stylesheet" type="text/css"/>
<link href="/static/assets/css/custom.css" rel="stylesheet" type="text/css"/>
<!-- END THEME STYLES -->
<link rel="shortcut icon" href="favicon.ico"/>
<link href="/static/assets/css/toastr.min.css" rel="stylesheet"/>

	
</head>
<!-- BEGIN BODY -->
<body class="login">
<!-- BEGIN LOGO -->
<div class="logo">
	<!-- <a href="index.html"> -->
		<!-- <img src="/static/assets/img/logo-big.png" alt=""/> -->
		<h3 style="color: white;">
		<span>东海航海保障中心电子档案系统</span>
		</h3>
	<!-- </a> -->
</div>
<!-- END LOGO -->
<!-- BEGIN LOGIN -->
<div class="content">
	<!-- BEGIN LOGIN FORM -->
		<h3 class="form-title">登录账号</h3>
		<div class="alert alert-danger display-hide">
			<button class="close" data-close="alert"></button>
			<span>
				 Enter any username and password.
			</span>
		</div>
		<!-- <form class="login-form" action="<?php echo url('login/doLogin'); ?>"  method="post"> -->
		<div class="form-group">
			<!--ie8, ie9 does not support html5 placeholder, so we just show field title for that-->
			<label class="control-label visible-ie8 visible-ie9">Username</label>
			<div class="input-icon">
				<i class="fa fa-user"></i>
				<input class="form-control placeholder-no-fix" type="text" autocomplete="off" placeholder="用户名" name="username" id="username" />
			</div>
		</div>
		<div class="form-group">
			<label class="control-label visible-ie8 visible-ie9">Password</label>
			<div class="input-icon">
				<i class="fa fa-lock"></i>
				<input class="form-control placeholder-no-fix" type="password" autocomplete="off" placeholder="密码" name="pwd" id="password" />
			</div>
		</div>
		<div class="form-actions">
			<label class="checkbox">
			<input type="checkbox" name="remember" value="1"/ id="remember"> 记住密码 </label>
			<button type="submit" class="btn green pull-right">
			登录 <i class="m-icon-swapright m-icon-white"></i>
			</button>
		</div>
		<!-- </form> -->
		
	<!-- END LOGIN FORM -->
	<!-- BEGIN FORGOT PASSWORD FORM -->
	
	<!-- END FORGOT PASSWORD FORM -->
	<!-- BEGIN REGISTRATION FORM -->
	
	<!-- END REGISTRATION FORM -->
</div>
<!-- END LOGIN -->
<!-- BEGIN COPYRIGHT -->
<div class="copyright">
	 2018 &copy; 仁聚科技
</div>
<!-- END COPYRIGHT -->
<!-- BEGIN JAVASCRIPTS(Load javascripts at bottom, this will reduce page load time) -->
<!-- BEGIN CORE PLUGINS -->
<!--[if lt IE 9]>
	<script src="/static/assets/plugins/respond.min.js"></script>
	<script src="/static/assets/plugins/excanvas.min.js"></script> 
	<![endif]-->
<script src="/static/assets/plugins/jquery-1.10.2.min.js" type="text/javascript"></script>
<script src="/static/assets/plugins/jquery-migrate-1.2.1.min.js" type="text/javascript"></script>
<script src="/static/assets/plugins/bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
<script src="/static/assets/plugins/bootstrap-hover-dropdown/bootstrap-hover-dropdown.min.js" type="text/javascript"></script>
<script src="/static/assets/plugins/jquery-slimscroll/jquery.slimscroll.min.js" type="text/javascript"></script>
<script src="/static/assets/plugins/jquery.blockui.min.js" type="text/javascript"></script>
<script src="/static/assets/plugins/jquery.cokie.min.js" type="text/javascript"></script>
<script src="/static/assets/plugins/uniform/jquery.uniform.min.js" type="text/javascript"></script>
<!-- END CORE PLUGINS -->
<!-- BEGIN PAGE LEVEL PLUGINS -->
<script src="/static/assets/plugins/jquery-validation/dist/jquery.validate.min.js" type="text/javascript"></script>
<script type="text/javascript" src="/static/assets/plugins/select2/select2.min.js"></script>
<!-- END PAGE LEVEL PLUGINS -->
<!-- BEGIN PAGE LEVEL SCRIPTS -->
<script src="/static/assets/scripts/core/app.js" type="text/javascript"></script>
<script src="/static/assets/scripts/custom/login.js" type="text/javascript"></script>
<!-- END PAGE LEVEL SCRIPTS -->
<script>
		jQuery(document).ready(function() {     
		  App.init();
		  Login.init();
		});
	</script>
<!-- END JAVASCRIPTS -->
<script src="/static/assets/js/toastr.min.js" rel="stylesheet"/></script>

<script>
	$('.pull-right').click(function(){
		// console.log();
		go();
	})
	function go(){     
         //提交数据函数   
        toastr.options = {  
            closeButton: true,  
            debug: false,  
            progressBar: true,  
            positionClass: "toast-top-right",  
            onclick: null,  
            showDuration: "1000",  
            hideDuration: "1000",  
            timeOut: "1000",  
            extendedTimeOut: "1000",  
            showEasing: "swing",  
            hideEasing: "linear",  
            showMethod: "fadeIn",  
            hideMethod: "fadeOut"  
        };
        $.ajax({                                                  //调用jquery的ajax方法   
          type: "POST",                                      //设置ajax方法提交数据的形式   
          url: '/index/Login/doLogin',                                        
          data: {
                  username : $("#username").val(),
                  password : $("#password").val(),
                  remember : $('input:checkbox[name="remember"]:checked').val()
              }, 

          success: function(res){ 

          // console.log(res);     
          if (res == '用户名不存在' ) {
            toastr.error('登录失败，请检查用户名');
            setInterval(function(){
            window.location.reload();
            }, 2000);
            
          }else if(res == '密码不正确'){
          	toastr.error('登录失败，请检查密码');
            setInterval(function(){
            window.location.reload();
            }, 2000);
          }
          	else{
            toastr.success('登录成功');
            // return view('index/Login/goHome',$res);
            setInterval(function(){
            window.location.href = "<?php echo url('index/index/index'); ?>";
              // window.location.reload();
            }, 2000);
          }
        },
        error: function () {
                alert('AJAX操作失败');
            }
        });   
     }   
</script>
<script>
// 	$("body").keydown(function(){
// 		var curKey = e.which;
//     if(curKey  == 13){
//         go();
//     }

// });
	    $(document).ready(function(){
        $("body").keydown(function(e){
            var curKey = e.which;
            if(curKey == 13){
 
                go();
            }
        });
    });

</script>
</body>
<!-- END BODY -->
</html>